# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-session
pkgver=3.36.0
pkgrel=3
pkgdesc="GNOME session manager"
url="https://gitlab.gnome.org/GNOME/gnome-session"
arch="all !s390x !ppc64le !mips !mips64"
license="GPL-2.0-or-later"
depends="polkit alsa-plugins-pulse dconf pulseaudio-alsa bash gnome-shell"
makedepends="gnome-settings-daemon-dev libsm-dev
	elogind-dev itstool libxslt libxml2-utils json-glib-dev gnome-desktop-dev
	gtk+3.0-dev startup-notification-dev upower-dev meson xmlto
	docbook-xml"
options="!check" #no tests
subpackages="$pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-session/${pkgver%.*}/gnome-session-$pkgver.tar.xz
	0001-revert-autostart-app-Strip-blacklisted-variables-fro.patch"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--buildtype=plain \
		-Dsystemd_journal=true \
		-Dsystemd_session=disable \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
	rm -rf "$pkgdir"/usr/lib/systemd
}

sha512sums="234456e8617524a3b95afb505246823ced4eca3ca009d48fc0bde70f8c620814495b04509c134bfb72760619990cc7cb7363ba13f0d90d9f038e8a43eadb6e9d  gnome-session-3.36.0.tar.xz
3d61a847da175b780fce8b2646264836656e6cdc6294e0af6c667a64f30e6d837ef22ce54b3ac51c4f569a7e09844bdcd058417292ea014826256157fa7dbdc3  0001-revert-autostart-app-Strip-blacklisted-variables-fro.patch"
